<div class='item'>
  <div class='img'>
    <%= image_tag 'money/daily_draw.jpg', :size => '105x78' %>
  </div>
  <div class='text'>
    <div class='line1'>
      每日领取麦粒！
    </div>
    <div class='line2'>
      <b>任务目标：</b>每日领取麦粒，连续领取有奖励哦！<%= link_to_function '[?]','', :class => :help, :title => about_draw_money %>
    </div>
  </div>
  <div class='remark'>
    <% if current_user.has_drawn_money? %>
    <div>
      完成于<%= time_ago_in_words current_user.the_lastest_drawn_money_feed.created_at, false %>前
    </div>
    <div>
      已获得麦粒：<b><%= current_user.the_lastest_drawn_money_feed.added_money %></b>    
    </div>
    <div>
      已连领<%= current_user.current_draw_money_duration_days %>天,明天可领<b><%= current_user.how_much_can_be_drawn_tomorrow_if_drawn_today %></b>
    </div>
    <% else %>
    可获得麦粒：<b><%= current_user.how_much_can_be_drawn %></b>
    <% end %>
  </div>
  <% if not current_user.has_drawn_money? %>
  <div id='daily_draw_task' class='tools'>
    <% if current_user.has_drawn_money? %>
    <%= link_to_function '已经领取',"$('draw_now').onclick()",:title => "已连领#{current_user.current_draw_money_duration_days}天 明天可领#{current_user.how_much_can_be_drawn_tomorrow_if_drawn_today}", :class => 'corner done' %>
    <% else %>
    <%= link_to_function '立即领取',"$('draw_now').onclick();#{small_loading('daily_draw_task',:only_img =>true)}", :class => :corner %>
    <% end %>
  </div>
  <dl id="daily_draw_feeds" class='feeds'>
    <dt>近期：</dt>
    <% Feed::MoneyDailyDraw.all(:order => 'created_at desc', :limit => 20).each_with_index do |feed, index| %>
    <dd class='feed' style='<%= index == 0 ? '' : 'display:none' %>'><%= feed_to_html feed %></dd>
    <% end %>
  </dl>
  <script type="text/javascript" charset="utf-8">
    setInterval("next_feed('daily_draw_feeds')",5000);
  </script>
  <% end %>
</div>